<!DOCTYPE html>
<html>
<head>
    <meta   charset="UTF-8">
    <title>后台管理</title>
    <link href="../style/css/loginAdmin.css" rel="stylesheet" type="text/css" />
    <script src="../style/js/jquery-1.8.3.min.js" type="text/javascript" charset="utf-8"></script>
</head>
<script type="text/javascript">
    function  login(){
        $.post("../login/login",$("#loginId").serialize(),function(res){
            if(res.code==201||res.code==500){
                alert(res.msg);
            }else if(res.code==200){
                console.log(res);
                window.sessionStorage.setItem("account",res.data.account);
                window.sessionStorage.setItem("id",res.data.id);
                window.sessionStorage.setItem("type",res.data.type);
                window.sessionStorage.setItem("newFileName",res.data.newFileName);
                location.replace("main.html");
            }
        },"json");
    }
</script>


<body>
<div class="login_box">
    <div class="login_l_img"><img src="../style/img/adminLoginPicture/login-img.png" /></div>
    <div class="login">
        <div class="login_logo"><a href="#"><img src="../style/img/adminLoginPicture/login_logo.png" /></a></div>
        <div class="login_name">
            <p>后台管理系统</p>
        </div>
        <form id="loginId" >
            <input name="account" type="text" placeholder="账号">
            <input name="password" type="password" placeholder="密码">
            <input value="登录" style="width:100%;" type="button" onclick="login()">
        </form>
    </div>
    <div class="copyright">某某有限公司 版权所有©2016-2018 技术支持电话：000-00000000</div>
</div>
</body>
</html>
